<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //1.用户输入
        //2.内部处理保存数据
        //3.输出
        let name = prompt('请输入你的姓名：')
        let age = prompt('请输入你的年龄：')
        let sex = prompt('请输入你的性别：')
        document.write(`
            <table border="1" align="center" cellpadding="25" cellspacing="0">
                <tr>
                    <th>姓名</th>
                    <th>年龄</th>
                    <th>性别</th>
                </tr>
                <tr>
                    <td>${name}</td>
                    <td>${age}</td>
                    <td>${sex}</td>
                </tr>
            </table>
        `)
        document.write(name)
    </script>
</body>

</html>